<%@page import="java.util.UUID"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.PrintWriter"%>
	<% 
	try{
		String filepath = (String)request.getSession().getAttribute(request.getParameter("id"));
		
		String l_outstandingFolder = getServletContext().getRealPath("/outstanding");
		response.setContentType("application/xls");
		response.setHeader("Content-Disposition", "attachment;filename=" + UUID.randomUUID().toString() + ".xls");
		
		PrintWriter l_out = response.getWriter();
		FileInputStream l_inputStream = new FileInputStream(filepath);
		int c;
		while((c= l_inputStream.read())!= -1){
			l_out.write(c);
		}
		l_inputStream.close();
		l_out.close();
		
		
	}catch(Exception e){
		e.printStackTrace();
	}
	%>